package com.acme.bankapp.domain.bank;

public class CheckingAccount extends AbstractAccount {
	protected double overdraft;
	
	public CheckingAccount(double balance, double overdraft) {
		super(balance);
		this.overdraft = overdraft;
	}

	public void withdraw(double amount) {
		if (amount > 0 && amount <= balance + overdraft) {
			balance -= amount;
		}
	}

	public double maximumAmountToWithdraw() {
		return balance + overdraft;
	}

}
